import pandas as pd
import networkx as nx

def create_directed_graph(df: pd.DataFrame) -> nx.DiGraph:
    """Create a directed graph from dataframe."""
    G = nx.DiGraph() # create NetworkX object
    for _, row in df.iterrows(): # iterate over the rows
        # add the edges based on the information of each row
        G.add_edge(
            row['Source'], row['Target'],
            YOB_S=row['YOB_S'], COB_S=row['COB_S'], field_of_human_activity=row['field_of_human_activity'],
            YOB_T=row['YOB_T'], COB_T=row['COB_T'], field_of_human_activity_T=row['field_of_human_activity_T']
        )
    return G